/**
 * 
 */
package com.sqq.model.kl;

import java.util.List;

import com.jfinal.ext.plugin.tablebind.TableBind;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sqq.jfinalbase.SqqModel;

/**
 *@author gqy
 *2015-1-13
 */

@TableBind(tableName = "router_macscan")
public class RouterTookenModel extends SqqModel<RouterTookenModel> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static RouterTookenModel dao = new RouterTookenModel();
	
	/**
	 * 根据mac和探针mac获取设备对应的用户ID
	 * @param mac
	 * @param gwMac
	 * @return
	 */
	public static Record getUserRecordByMacAndgwMac(String mac,String gwMac) {
		String sql = "select * from router_tooken where mac=? and gwMac=? order by create_time desc ";
        Record record = Db.findFirst(sql,mac,gwMac);
        return record;
    }
}
